<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="custom" tagdir="/WEB-INF/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link rel="stylesheet" type="text/css" href="/WEB-INF/css/stylesheet.css">
	<title>Remote Features</title>
</head>
	<body>
		<div class="body">
			<div class="topBar">
				<div id="pageTitle">
					Remote Features
				</div>
			</div>
			<custom:menuBar/>
			<div class="features">
				<table class="featuresTable">
					<c:if test="${featureArray[0] != '2' }">
						<tr>
							<td>
								Panic Mode - <div id="featureButton"><c:if test="${featureArray[0] != '2'}">
									<form method="POST" action="Features">
										<input type="hidden" name="featureName" value="panicMode"/>
										<c:choose>
											<c:when test="${featureArray[0] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[0] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</c:if></div>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								Screamer Mode - <div id="featureButton">
									<form method="POST" action="Features">
										<input type="hidden" name="featureName" value="screamerMode"/>
										<c:choose>
											<c:when test="${featureArray[1] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[1] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</div>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[2] != '2'}">
						<tr>
							<td>
								WiFi - <div id="featureButton"><form method="POST" action="Features">
										<input type="hidden" name="featureName" value="WiFi"/>
										<c:choose>
											<c:when test="${featureArray[2] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[2] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</div>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[3] != '2'}">
						<tr>
							<td>
								Bluetooth - <div id="featureButton"><form method="POST" action="Features">
										<input type="hidden" name="featureName" value="bluetooth"/>
										<c:choose>
											<c:when test="${featureArray[3] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[3] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</div>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[4] != '2'}">
						<tr>
							<td>
								3G - <div id="featureButton"><form method="POST" action="Features">
										<input type="hidden" name="featureName" value="3G"/>
										<c:choose>
											<c:when test="${featureArray[4] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[4] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</div>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[5] != '2'}">
						<tr>
							<td>
								4G - <div id="featureButton"><form method="POST" action="Features">
										<input type="hidden" name="featureName" value="4G"/>
										<c:choose>
											<c:when test="${featureArray[5] == '0'}">
												<input type="submit" value="Toggle On"/>
											</c:when>
											<c:when test="${featureArray[5] == '1' }">
												<input type="submit" value="Toggle Off"/>
											</c:when>
										</c:choose>
									</form>
								</div>
							</td>
						</tr>
					</c:if>
				</table>
			</div>
		</div>
	</body>
</html>